Skip to content

added locale.h and added more wide-char prototypes#666

Closed
ZERICO2005 wants to merge 1 commit intomasterfrom
add_locale
Closed

added locale.h and added more wide-char prototypes#666
ZERICO2005 wants to merge 1 commit intomasterfrom
add_locale

Conversation

@ZERICO2005
Copy link
Contributor

@ZERICO2005 ZERICO2005 commented Nov 4, 2025

Added <locale.h>. setlocale and localeconv are basically hard-coded to return the "C" locale. The llvm/libcxx headers require locale. I have also defined prototypes for wide-char and multi-byte-char functions. This allows for clang headers to compile without #if 0'ing code; But there is no intention on implementing these functions.

I came up with this definition for mbstate_t. But this can be changed to any non-empty struct.

typedef struct {
    int __count;
    union {
        wint_t __value;
        unsigned char __bytes[sizeof(wint_t)];
    };
} mbstate_t;

@ZERICO2005 ZERICO2005 marked this pull request as ready for review November 20, 2025 19:14
@ZERICO2005 ZERICO2005 marked this pull request as draft November 20, 2025 19:15
@ZERICO2005 ZERICO2005 closed this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant